scores={'python':100,'java':100,'web':99}
scores['js']=98 
print(scores) 

#keys() - 获取键 ,返回的类型是dict_keys
print(scores.keys(),type(scores.keys()))   
#list() -  dict-keys -->list
ks = list(scores.keys() )
print(ks[0])  

#values() - 获取值 ,返回dict_values
vs = scores.values()
print(vs,type(vs))  
vs = list(vs)
print(vs) 

# for in  语句遍历
for k in scores:
    print(k,scores[k])    #字典中的键

# scores['php']=97
# scores['php']=0  
# print(scores) 
sc = scores.setdefault('php',0)
print(scores) 
print(sc) 






